let tzLeftMenuOpen = document.querySelector("ul");
tzLeftMenuOpen.addEventListener("click", function () {
  let str = event.target.dataset.id;
  switch (str) {
    case "0":
      event.target.previousElementSibling.classList.toggle("tz-openandclose");
      break;
    case "2":
      event.target.parentNode.classList.toggle("tz-ul-display2");
      event.target.previousElementSibling.previousElementSibling.classList.toggle(
        "tz-openandclose"
      );
      break;
    case "3":
      event.target.parentNode.classList.toggle("tz-ul-display3");
      event.target.previousElementSibling.previousElementSibling.classList.toggle(
        "tz-openandclose"
      );
      break;
    case "4":
      event.target.parentNode.classList.toggle("tz-ul-display4");
      event.target.previousElementSibling.previousElementSibling.classList.toggle(
        "tz-openandclose"
      );
      break;
    case "12":
      window.location.href = event.target.dataset.href;
      break;
    case "13":
      window.location.href = event.target.dataset.href;
      break;
  }
});
tzLeftMenuOpen.addEventListener("mouseover", function () {
  let str = event.target.dataset.id;
  switch (str) {
    case "0":
      event.target.classList.toggle("tz-ul-choosed-color");
      break;
    case "2":
      event.target.classList.toggle("tz-ul-choosed-color");
      break;
    case "3":
      event.target.classList.toggle("tz-ul-choosed-color");
      break;
    case "4":
      event.target.classList.toggle("tz-ul-choosed-color");
      break;
    case "12":
      event.target.classList.toggle("tz-li-choosed-color");
      break;
    case "13":
      event.target.parentNode.classList.toggle("tz-li-choosed-color");
      break;
  }
});
tzLeftMenuOpen.addEventListener("mouseout", function () {
  let str = event.target.dataset.id;
  switch (str) {
    case "0":
      event.target.classList.toggle("tz-ul-choosed-color");
      break;
    case "2":
      event.target.classList.toggle("tz-ul-choosed-color");
      break;
    case "3":
      event.target.classList.toggle("tz-ul-choosed-color");
      break;
    case "4":
      event.target.classList.toggle("tz-ul-choosed-color");
      break;
    case "12":
      event.target.classList.toggle("tz-li-choosed-color");
      break;
    case "13":
      event.target.parentNode.classList.toggle("tz-li-choosed-color");
      break;
  }
});
